<template>
  <div>
    <el-form ref="form"  label-width="80" v-for="item in form" disabled>
      <el-form-item label="我的昵称" style="display: flex">
        <el-input v-model="item.name"></el-input>
      </el-form-item>
      <el-form-item label="手机号" style="display: flex;">
        <el-input v-model="item.tel" style="margin-left: 10px"></el-input>
      </el-form-item>
      <el-form-item label="我的性别" style="display: flex">
        <el-input v-model="item.type"></el-input>
      </el-form-item>
      <el-form-item label="我的身高" style="display: flex">
        <el-input v-model="item.tall"></el-input>
      </el-form-item>
      <el-form-item label="我的体重" style="display: flex">
        <el-input v-model="item.weight"></el-input>
      </el-form-item>
      <el-form-item label="我的目标" style="display: flex">
        <el-input v-model="item.aim_name"></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import Bus from '../../../Bus'
    export default {
        name: "UserInfo",
        data(){
          return{
            form: {
              name:"",
              tel:"",
              type:"",
              tall:"",
              weight:"",
              aim_name:"",
            }
          }
        },
      created() {
        var telephone=this.$store.state.telephone
        var this_=this
        this.$axios.get('http://127.0.0.1:8080/record/ziliao', {
          params: {
            telephone:telephone
          }
        })
          .then(function (response) {
            this_.form=response.data
            // console.log(this_.form)
            this_.$store.state.user_info=this_.form
            // console.log(this_.form);
          })
          .catch(function (error) {
            console.log(error);
          });


      }
    }
</script>

<style scoped>

</style>
